package com.itheima.service;


import com.itheima.config.HystrixConfig;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

@Service
@FeignClient(value = "hystrix-provider", configuration = HystrixConfig.class, fallback = LocalItemServiceImpl.class)
public interface LocalItemService {

    @GetMapping(value = "/hi")
    String hi(@RequestParam(value = "age") int age);


    @GetMapping(value = "/hello")
    String hello(@RequestParam(value = "name") String name);

}
